/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

import Controller.Menu;
import javax.swing.JTextField;

/**
 *
 * @author Debora
*/

public class view_cad_control_estoque extends javax.swing.JFrame {
    Menu menu = new Menu();
   
    
    /**
     * 
     * Creates new form viewn_cad_control_estoque
     */
    public view_cad_control_estoque() {
        initComponents();
    }  
       
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jCheckBox1 = new javax.swing.JCheckBox();
        jSeparator5 = new javax.swing.JSeparator();
        jSpinner1 = new javax.swing.JSpinner();
        aba = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        nome = new javax.swing.JTextField();
        labelCadastroCliente = new javax.swing.JLabel();
        label_nome = new javax.swing.JLabel();
        Endereco = new javax.swing.JTextField();
        label_endereco = new javax.swing.JLabel();
        telefone = new javax.swing.JTextField();
        label_telefone = new javax.swing.JLabel();
        CadastrarCliente = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        labelCadastroItem = new javax.swing.JLabel();
        artigo = new javax.swing.JTextField();
        label_artigo = new javax.swing.JLabel();
        preco = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        CadastrarItem = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        labelComprarItens = new javax.swing.JLabel();
        labelInformaItem = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        QuantidadeComprada = new javax.swing.JTextField();
        ComprandoItem = new javax.swing.JButton();
        ItemComprado = new javax.swing.JTextField();
        labelTotalPagoCompra = new javax.swing.JLabel();
        labelCompraR$ = new javax.swing.JLabel();
        CompraTotal = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        VendaCliente = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        ItemVendido = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        QuantidadeVendida = new javax.swing.JTextField();
        AdicionaCompra = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        ItemEstoque = new javax.swing.JButton();
        LabelRelatItensEstoque = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        LabelRelatVendasItem = new javax.swing.JLabel();
        LabelInformeItemRelat = new javax.swing.JLabel();
        RelatorioItem = new javax.swing.JTextField();
        RelatVendasItem = new javax.swing.JButton();
        jSeparator3 = new javax.swing.JSeparator();
        LabelVendasClienteRelat = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        ClienteRelat = new javax.swing.JTextField();
        GerarRelatClienteVenda = new javax.swing.JButton();
        jSeparator4 = new javax.swing.JSeparator();
        jLabel7 = new javax.swing.JLabel();
        GerarLucroPreju = new javax.swing.JButton();
        jSeparator7 = new javax.swing.JSeparator();
        jLabel10 = new javax.swing.JLabel();
        GeraRelatorioSaida = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();
        GerarEntrada = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        GeraGraficoItem = new javax.swing.JButton();
        jSeparator6 = new javax.swing.JSeparator();
        jLabel9 = new javax.swing.JLabel();
        GerarGraficoCliente = new javax.swing.JButton();

        jCheckBox1.setText("jCheckBox1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        nome.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nomeActionPerformed(evt);
            }
        });

        labelCadastroCliente.setText("                                                                                                                  Cadastro Cliente");

        label_nome.setText("             Nome: ");

        Endereco.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                EnderecoActionPerformed(evt);
            }
        });

        label_endereco.setText("       Endereco:");

        label_telefone.setText("           Telefone:");

        CadastrarCliente.setText("Cadastrar");
        CadastrarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CadastrarClienteActionPerformed(evt);
            }
        });

        labelCadastroItem.setText("Cadastro Item");

        label_artigo.setText("                Artigo:");

        jLabel1.setText("Preco Venda:");

        CadastrarItem.setText("Cadastrar");
        CadastrarItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CadastrarItemActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(labelCadastroCliente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jSeparator1)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(label_nome, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(label_endereco)
                                        .addGap(0, 0, Short.MAX_VALUE))))
                            .addComponent(label_telefone, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(Endereco, javax.swing.GroupLayout.DEFAULT_SIZE, 685, Short.MAX_VALUE)
                            .addComponent(nome)
                            .addComponent(telefone)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(label_artigo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(jLabel1)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(artigo, javax.swing.GroupLayout.DEFAULT_SIZE, 685, Short.MAX_VALUE)
                            .addComponent(preco))))
                .addGap(22, 22, 22))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(339, 339, 339)
                        .addComponent(CadastrarCliente))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(346, 346, 346)
                        .addComponent(labelCadastroItem))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(339, 339, 339)
                        .addComponent(CadastrarItem)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(labelCadastroCliente)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_nome))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(Endereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_endereco))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(telefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_telefone))
                .addGap(18, 18, 18)
                .addComponent(CadastrarCliente)
                .addGap(22, 22, 22)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(labelCadastroItem)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(artigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(label_artigo))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(preco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel1))
                .addGap(18, 18, 18)
                .addComponent(CadastrarItem)
                .addContainerGap(201, Short.MAX_VALUE))
        );

        aba.addTab("Cadastrar", jPanel1);

        labelComprarItens.setText("                                                                                                         Comprando Itens (Estocando)");

        labelInformaItem.setText("Informe o Item:");

        jLabel2.setText("Quantidade:");

        ComprandoItem.setText("Ok");
        ComprandoItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ComprandoItemActionPerformed(evt);
            }
        });

        labelTotalPagoCompra.setText("Total pago:");

        labelCompraR$.setText("R$:");

        CompraTotal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CompraTotalActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelComprarItens, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(labelInformaItem)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addGap(175, 175, 175)
                                        .addComponent(labelTotalPagoCompra)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(labelCompraR$)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(CompraTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(ComprandoItem))
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(QuantidadeComprada)
                                            .addComponent(ItemComprado, javax.swing.GroupLayout.PREFERRED_SIZE, 544, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 129, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(72, 72, 72)
                .addComponent(labelComprarItens)
                .addGap(38, 38, 38)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ItemComprado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelInformaItem))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(QuantidadeComprada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(53, 53, 53)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCompraR$)
                    .addComponent(CompraTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelTotalPagoCompra)
                    .addComponent(ComprandoItem))
                .addContainerGap(231, Short.MAX_VALUE))
        );

        aba.addTab("Comprar Itens", jPanel2);

        jLabel3.setText("Informe o cliente:");

        jLabel4.setText("Informe o Item:");

        jLabel5.setText("Informe a quantidade vendida:");

        AdicionaCompra.setText("Ok");
        AdicionaCompra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AdicionaCompraActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(111, 111, 111)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addGap(1, 1, 1)))
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(VendaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 460, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ItemVendido, javax.swing.GroupLayout.PREFERRED_SIZE, 460, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(239, 239, 239)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(QuantidadeVendida, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(289, 289, 289)
                        .addComponent(AdicionaCompra)))
                .addContainerGap(133, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(129, 129, 129)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(VendaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(ItemVendido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(QuantidadeVendida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(AdicionaCompra)
                .addContainerGap(215, Short.MAX_VALUE))
        );

        aba.addTab("Vender Itens", jPanel3);

        ItemEstoque.setText("Gerar");
        ItemEstoque.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ItemEstoqueActionPerformed(evt);
            }
        });

        LabelRelatItensEstoque.setText("Gerar Relatorio de Itens em Estoque: ");

        LabelRelatVendasItem.setText("Gerar Relatorio de vendas por item");

        LabelInformeItemRelat.setText("Informe o item: ");

        RelatVendasItem.setText("Gerar");
        RelatVendasItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RelatVendasItemActionPerformed(evt);
            }
        });

        LabelVendasClienteRelat.setText("Gerar Relatorio de vendas por cliente");

        jLabel6.setText("Informe o Cliente: ");

        GerarRelatClienteVenda.setText("Gerar");
        GerarRelatClienteVenda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GerarRelatClienteVendaActionPerformed(evt);
            }
        });

        jLabel7.setText("Gerar Relatorio de Lucro/Prejuizo: ");

        GerarLucroPreju.setText("Gerar");
        GerarLucroPreju.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GerarLucroPrejuActionPerformed(evt);
            }
        });

        jLabel10.setText("Gerar Relatorio de total de saídas (dinheiro gasto na compra de produtos):");

        GeraRelatorioSaida.setText("Gerar");
        GeraRelatorioSaida.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GeraRelatorioSaidaActionPerformed(evt);
            }
        });

        jLabel11.setText("Gerar Relatorio de total de entradas (dinheiro recebido na venda de produtos): ");

        GerarEntrada.setText("Gerar");
        GerarEntrada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GerarEntradaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator2)
            .addComponent(jSeparator3)
            .addComponent(jSeparator4)
            .addComponent(jSeparator7)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(288, 288, 288)
                        .addComponent(LabelRelatVendasItem))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(285, 285, 285)
                        .addComponent(LabelVendasClienteRelat))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(268, 268, 268)
                        .addComponent(LabelRelatItensEstoque)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(ItemEstoque))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(154, 154, 154)
                        .addComponent(LabelInformeItemRelat)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(RelatorioItem, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(RelatVendasItem))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(140, 140, 140)
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ClienteRelat, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(GerarRelatClienteVenda))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(272, 272, 272)
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GerarLucroPreju))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(139, 139, 139)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel10)
                            .addComponent(jLabel11))
                        .addGap(26, 26, 26)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(GerarEntrada)
                            .addComponent(GeraRelatorioSaida))))
                .addContainerGap(166, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(58, 58, 58)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(LabelRelatItensEstoque)
                    .addComponent(ItemEstoque))
                .addGap(18, 18, 18)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(LabelRelatVendasItem)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(LabelInformeItemRelat)
                    .addComponent(RelatorioItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RelatVendasItem))
                .addGap(18, 18, 18)
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(LabelVendasClienteRelat)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(ClienteRelat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(GerarRelatClienteVenda))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(GeraRelatorioSaida))
                .addGap(34, 34, 34)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(GerarEntrada))
                .addGap(39, 39, 39)
                .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(GerarLucroPreju))
                .addContainerGap(52, Short.MAX_VALUE))
        );

        aba.addTab("Relatorios", jPanel4);

        jLabel8.setText("Gerar grafico de quantidade de venda de cada produto:");

        GeraGraficoItem.setText("Gerar");
        GeraGraficoItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GeraGraficoItemActionPerformed(evt);
            }
        });

        jLabel9.setText("Gerar grafico dos cinco clientes que mais compraram: ");

        GerarGraficoCliente.setText("Gerar");
        GerarGraficoCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                GerarGraficoClienteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator6)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(238, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(GerarGraficoCliente)
                        .addGap(226, 226, 226))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(GeraGraficoItem)
                        .addGap(219, 219, 219))))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(85, 85, 85)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(GeraGraficoItem))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 102, Short.MAX_VALUE)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(69, 69, 69)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(GerarGraficoCliente))
                .addGap(177, 177, 177))
        );

        aba.addTab("Graficos", jPanel5);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(aba, javax.swing.GroupLayout.PREFERRED_SIZE, 795, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(aba)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void CadastrarItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CadastrarItemActionPerformed
        menu.CadastroItem(getArtigo().getText(), getPreco().getText());
    }//GEN-LAST:event_CadastrarItemActionPerformed

    private void CadastrarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CadastrarClienteActionPerformed
        menu.CadastroCliente(getNome().getText(),getEndereco().getText(),getTelefone().getText());
    }//GEN-LAST:event_CadastrarClienteActionPerformed

    private void EnderecoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_EnderecoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_EnderecoActionPerformed

    private void nomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nomeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_nomeActionPerformed

    private void ComprandoItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ComprandoItemActionPerformed
         // TODO add your handling code here:
         menu.Compra(getItemComprado().getText(),getQuantidadeComprada().getText(),getCompraTotal().getText());

    }//GEN-LAST:event_ComprandoItemActionPerformed

    private void CompraTotalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CompraTotalActionPerformed
         // TODO add your handling code here:
    }//GEN-LAST:event_CompraTotalActionPerformed

    private void AdicionaCompraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AdicionaCompraActionPerformed
        menu.Venda(getVendaCliente().getText(),getItemVendido().getText(),getQuantidadeVendida().getText());
    }//GEN-LAST:event_AdicionaCompraActionPerformed

    private void ItemEstoqueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemEstoqueActionPerformed
        menu.Relatorio1();
    }//GEN-LAST:event_ItemEstoqueActionPerformed

    private void RelatVendasItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RelatVendasItemActionPerformed
        menu.Relatorio2(getRelatorioItem().getText());
    }//GEN-LAST:event_RelatVendasItemActionPerformed

    private void GerarRelatClienteVendaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GerarRelatClienteVendaActionPerformed
        menu.Relatorio3(getClienteRelat().getText());
    }//GEN-LAST:event_GerarRelatClienteVendaActionPerformed

    private void GerarLucroPrejuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GerarLucroPrejuActionPerformed
        menu.Relatorio4();
    }//GEN-LAST:event_GerarLucroPrejuActionPerformed

    private void GeraGraficoItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GeraGraficoItemActionPerformed
        menu.GeraGrafico1();
    }//GEN-LAST:event_GeraGraficoItemActionPerformed

    private void GerarGraficoClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GerarGraficoClienteActionPerformed
        menu.GeraGrafico2();
    }//GEN-LAST:event_GerarGraficoClienteActionPerformed

    private void GerarEntradaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GerarEntradaActionPerformed
        menu.Relatorio5();
    }//GEN-LAST:event_GerarEntradaActionPerformed

    private void GeraRelatorioSaidaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GeraRelatorioSaidaActionPerformed
        menu.Relatorio6();
    }//GEN-LAST:event_GeraRelatorioSaidaActionPerformed
    
        
    public JTextField getRelatorioItem() {
        return RelatorioItem;
    }

    public JTextField getClienteRelat() {
        return ClienteRelat;
    }

    public JTextField getEndereco() {
        return Endereco;
    }

    public JTextField getCompraTotal() {
        return CompraTotal;
    }

    public JTextField getItemComprado() {
        return ItemComprado;
    }

    public JTextField getQuantidadeComprada() {
        return QuantidadeComprada;
    }

    public JTextField getNome() {
        return nome;
    }

    public JTextField getTelefone() {
        return telefone;
    }

    public JTextField getArtigo() {
        return artigo;
    }

    public JTextField getPreco() {
        return preco;
    }

    public JTextField getItemVendido() {
        return ItemVendido;
    }

    public JTextField getQuantidadeVendida() {
        return QuantidadeVendida;
    }

    public JTextField getVendaCliente() {
        return VendaCliente;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(view_cad_control_estoque.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(view_cad_control_estoque.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(view_cad_control_estoque.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(view_cad_control_estoque.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new view_cad_control_estoque().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton AdicionaCompra;
    private javax.swing.JButton CadastrarCliente;
    private javax.swing.JButton CadastrarItem;
    private javax.swing.JTextField ClienteRelat;
    private javax.swing.JTextField CompraTotal;
    private javax.swing.JButton ComprandoItem;
    private javax.swing.JTextField Endereco;
    private javax.swing.JButton GeraGraficoItem;
    private javax.swing.JButton GeraRelatorioSaida;
    private javax.swing.JButton GerarEntrada;
    private javax.swing.JButton GerarGraficoCliente;
    private javax.swing.JButton GerarLucroPreju;
    private javax.swing.JButton GerarRelatClienteVenda;
    private javax.swing.JTextField ItemComprado;
    private javax.swing.JButton ItemEstoque;
    private javax.swing.JTextField ItemVendido;
    private javax.swing.JLabel LabelInformeItemRelat;
    private javax.swing.JLabel LabelRelatItensEstoque;
    private javax.swing.JLabel LabelRelatVendasItem;
    private javax.swing.JLabel LabelVendasClienteRelat;
    private javax.swing.JTextField QuantidadeComprada;
    private javax.swing.JTextField QuantidadeVendida;
    private javax.swing.JButton RelatVendasItem;
    private javax.swing.JTextField RelatorioItem;
    private javax.swing.JTextField VendaCliente;
    private javax.swing.JTabbedPane aba;
    private javax.swing.JTextField artigo;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JSpinner jSpinner1;
    private javax.swing.JLabel labelCadastroCliente;
    private javax.swing.JLabel labelCadastroItem;
    private javax.swing.JLabel labelCompraR$;
    private javax.swing.JLabel labelComprarItens;
    private javax.swing.JLabel labelInformaItem;
    private javax.swing.JLabel labelTotalPagoCompra;
    private javax.swing.JLabel label_artigo;
    private javax.swing.JLabel label_endereco;
    private javax.swing.JLabel label_nome;
    private javax.swing.JLabel label_telefone;
    private javax.swing.JTextField nome;
    private javax.swing.JTextField preco;
    private javax.swing.JTextField telefone;
    // End of variables declaration//GEN-END:variables
}
